[DllImport("dmcl40.dll", EntryPoint="dmAPIExec", CharSet=CharSet.Ansi, ExactSpelling=true,CallingConvention=CallingConvention.Cdecl)]
private extern static int dmAPIExec(string command);
public bool Exec(string command, params object[] args)
{
string cmd = String.Format(null,command, args);
int res = dmAPIExec(cmd);
return (1 == res);
}